import request from '@/utils/request'

// 查询图书委托列表
export function listCommission(query) {
  return request({
    url: '/book/commission/list',
    method: 'get',
    params: query
  })
}

// 查询图书委托详细
export function getCommission(commissionId) {
  return request({
    url: '/book/commission/' + commissionId,
    method: 'get'
  })
}

// 新增图书委托
export function addCommission(data) {
  return request({
    url: '/book/commission',
    method: 'post',
    data: data
  })
}

// 修改图书委托
export function updateCommission(data) {
  return request({
    url: '/book/commission',
    method: 'put',
    data: data
  })
}

// 删除图书委托
export function delCommission(commissionId) {
  return request({
    url: '/book/commission/' + commissionId,
    method: 'delete'
  })
}
